import mysql from 'mysql2'
import {mysqlInterface} from '@/util/common'


const createMysqlPool = (pool: mysqlInterface) => {
    return mysql.createPool({
        host: pool.host,
        port: pool.port,
        database: pool.database,
        user: pool.user,
        password: pool.password
    }).promise()
}

export default createMysqlPool
